﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.SharePoint;
using Mystery.SharePoint;

namespace Magical.Collaboration
{
    class ProjectMetadata : SiteMetadata
    {
        private const string ProjectNumberKey = "MGL.ProjectNumber";

        /// <summary>
        /// A code that identifies the project
        /// </summary>
        public string ProjectNumber { get; set; }

        public ProjectMetadata(SPSite site)
            : base(site)
        {
            this.ProjectNumber = this.Read(ProjectNumberKey, "");
        }
        /// <summary>
        /// Override so that we can include additional values
        /// </summary>
        /// <returns></returns>
        protected override bool TransferValues()
        {
            bool b = base.TransferValues();

            b |= this.Write(ProjectNumberKey, this.ProjectNumber);

            return b;
        }
    }
}
